import com.google.gson.Gson;
import jpb.constant.StatusCode;
import org.apache.commons.codec.binary.Base64;
import org.junit.Test;

import javax.crypto.SecretKey;
import javax.crypto.spec.SecretKeySpec;

/**
 * Created by ZengYan on 2017/3/11.
 */



public class test<T> {

    public static void main(String[] args) {
            std();

            String stringKey = "test"+ StatusCode.JWT_SECRET;
            byte[] encodedKey = Base64.decodeBase64(stringKey);
            SecretKey key = new SecretKeySpec(encodedKey, 0, encodedKey.length, "AES");
            System.out.println(key);
    }



@Test
    public void getBean() {
                String mobile = "36903012/36903311";

            System.out.println();
    }

    private String toJson(Object object) {
        Gson gson = new Gson();
        return  gson.toJson(object);
    }
        public static void std(){
                String jwt = "eyJ0eWUiOiJqd3QiLCJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJqd3QiLCJpc3MiOiJHQ1UiLCJpYXQiOjE0ODk3NDk4NTYsInN1YiI6IntcIm9yZ21cIjpcIjIxMzczMTkyMzk4XCJ9IiwiZXhwIjoxNDg5NzUzNDU2fQ.NuGQvaso9IQm925JA0GnfXDMtH1GQWGFc6UVsUwpx98";
                int oneDot = jwt.indexOf(".");
                String header = jwt.substring(0,oneDot);
                int twoDot = jwt.indexOf(".",oneDot+1);
                String payload = jwt.substring(oneDot+1,twoDot);
                String signature =  jwt.substring(twoDot+1);
        }
//        Member member = new Member();
//        Manager manager = new Manager();
//        public void  sss(){
//                this.dsss(member,Member.class);
//        }
//        public void dsss(Object o,Class  cc){
//                Class c=cc.getClass();
//                cc m=(cc.getClass())o;
//                manager.getClass().getClass();
//
//                manager.getLoginTime();
//        }



}
